<div class="ibox">
<div class="ibox-content">
<form class="form-horizontal" id="addForm" action="${cxt!}/platform/errorCode/add" method="POST" >
           <div class="form-group">
	             <label for="namebasic" class="col-md-2 control-label">${_res["systemManage.errorCode"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3">
	              	<input type="text" class="form-control" name="errorCode.errorcode" placeholder="${_res["systemManage.errorCode"]}"  required aria-required="true">
	             </div>
	             
                <label class="col-sm-2 control-label">${_res["systemManage.returnType"]}<span class="fontColorRed">&nbsp;*</span></label>
                <div class="col-sm-3">
                    <#dict type="select" id="returnType" class="form-control" name="errorCode.returntype"  dictCode="RETURN_TYPE" required="true"/>
                </div>		             
           </div>
           <div class="hr-line-dashed"></div>
 
           <div class="form-group">
	             <label for="namebasic" class="col-md-2 control-label">${_res["systemManage.errorMessageCn"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3">
	              	<input type="text" class="form-control" name="errorCode.message" placeholder="${_res["systemManage.errorMessageCn"]}"  required aria-required="true">
	             </div>
	             
	             <label for="namebasic" class="col-md-2 control-label">${_res["systemManage.errorMessageEn"]}<span class="fontColorRed">&nbsp;*</span></label>
	             <div class="col-md-3">
	              	<input type="text" class="form-control" name="errorCode.messageen" placeholder="${_res["systemManage.errorMessageEn"]}"  required aria-required="true">
	             </div>	             
           </div>
           <div class="hr-line-dashed"></div>
            
           <div id="url-parameter"> 
	           <div class="form-group">
		             <label for="namebasic" class="col-md-2 control-label">${_res["systemManage.filedName"]}<span class="fontColorRed">&nbsp;*</span></label>
		             <div class="col-md-3">
		              	<input type="text" class="form-control" id="filedName" name="errorCode.filedname" placeholder="${_res["systemManage.filedName"]}"  required aria-required="true">
		             </div>     
	     
		             <label for="namebasic" class="col-md-2 control-label">${_res["systemManage.errorUrl"]}<span class="fontColorRed">&nbsp;*</span></label>
		             <div class="col-md-3">
		              	<input type="text" class="form-control"  id="errorlUrl" name="errorCode.errorurl" placeholder="${_res["systemManage.errorUrl"]}"  required aria-required="true">
		             </div>	               
		             
	           </div>
	           <div class="hr-line-dashed"></div>     
	       </div>      
            
            
            <div class="form-group">
              <div class="col-md-10 col-md-offset-2">
                <button type="button" class="btn btn-warning" onClick="ajaxContent('/platform/errorCode/list')">${_res["system.return"]}</button>
                <button type="submit" class="btn btn-primary" >${_res["system.save"]}</button>
                <button type="button" class="btn btn-danger" onClick="ajaxContent('/platform/errorCode/list')">${_res["system.cancel"]}</button>
              </div>
            </div>
</form>
</div></div>
<#submit  formId="addForm"  divId="content" />
<#nav />


<script type="text/javascript">
	(function pageInit(){
		//根据用户选择的执行方式，动态决定是否显示cron参数控件
		$("#returnType").change(function(){  
			var selVal=$(this).children('option:selected').val();//这就是selected的值
			if(selVal=='html'){  //returnType为html
				$("#url-parameter").css("display","block");
				$("#filedName").attr("required","true");
				$("#errorlUrl").attr("required","true");
				
				$("#filedName").attr("aria-required","true");
				$("#errorlUrl").attr("aria-required","true");
			}else{ //returnType为json
				$("#url-parameter").css("display","none");
				$("#filedName").removeAttr("required");
				$("#errorlUrl").removeAttr("required");
				
				$("#filedName").removeAttr("aria-required");
				$("#errorlUrl").removeAttr("aria-required");
			}
		});
	})();

</script>